package java1;

public class work5 {
	public static void main(String[] args) {
		  int a=0,b=0,c=0,d=0;
		  int f=10000;
		  for(f=10000;f<100000;f++){
		   a=f/10000;
		   b=f%10000/1000;
		   c=f%100/10;
		   d=f%10;
		   if(a==d&c==b){
		    System.out.println(f);
		   }
		  }
		 }

}
